Compact stars with non-uniform relativistic polytrope

This paper presents new relativistic composite polytropic models for compact stars by simultaneously solving Einstein field equations with the polytropic state equation to simulate the spherically symmetric, static matter distribution. Using a non-uniform polytropic index, we get the Tolman–Oppenheimer–Volkoff equation for the relativistic composite polytrope (CTOV). To analyze the star's structure, we numerically solve the CTOV equation and compute the Emden and mass functions for various relativistic parameters and polytropic indices appropriate for neutron stars. The calculation results show that, as the relativistic parameter approaches zero, we recover the well-known Lane-Emden equation from the Newtonian theory of polytropic stars; thus, testing the computational code by comparing composite Newtonian models to those in the literature yields good agreement. We compute composite relativistic models for the neutron star candidates Cen X-3, SAXJ1808.4-3658, and PSR J1614-22304. We compare the findings with various existing models in the literature. Based on the accepted models for PSR J1614-22304 and Cen X-3, the star's core radius is predicted to be between 50 and 60% percent of its total radius, while we found that the radius of the core of star SAXJ1808.4-3658 is around 30% of the total radius. Our findings show that the neutron star structure may be approximated by a composite relativistic polytrope, resulting in masses and radii that are quite consistent with observation.

quadratic EoS in the envelope layer and a polytropic core.An alternative approach may be called a non-uniform polytrope to model the internal structure of stars and planets (e.g., 21,22 ).
Neutron stars are one of the most compact in the cosmos, named after their core composition of massive neutrons.A neutron star's core crust with diluted neutron matter resembles unitary Fermi gas.Fermion couples with opposite spins behave like bosons at very low temperatures because they have zero total angular momentum.The Pauli exclusion principle does not apply to bosons, unlike fermions.They condense into the lowest-energy single-particle state below a minimal temperature, leading to superfluidity and Bose-Einstein Condensation (BEC) 23 .These stars serve as laboratories for studying high-density nuclear matter using a suitable equation of state (EoS) that relates matter density to pressure.Neutron stars typically have a mass of one to two solar masses (M ∼ 1−2 M ⊙ ) and a radius of around 10−14 km.The mass density (ρ) is around 10 15 g cm −3 , which is almost three times the standard nuclear density (ρ c ) of a heavy atomic nucleus (2.8 × 10 14 g cm −3 ) [24][25][26][27] .
In astrophysics, composite polytropic models are occasionally employed to simulate the interior structure of stars where equilibrium conditions vary across different zones 31 .Among the examples are stars in the late stages of evolution (e.g., white dwarfs and neutron stars) and stars with radiative envelopes around convective cores, or vice versa.Matter in neutron stars can be as diverse as nuclei buried in a sea of electrons at low densities in the outer crust, structures in the inner crust that are becoming more and more neutron-rich, uniform matter in the outer core that is extremely neutron-rich, and potentially exotic states of matter at high densities in the inner core.As a result, the double-layered hypothesis (core-envelope), which considers two neighboring layers of the star with distinct matter distributions and macroscopic physical characteristics, starts to make sense 16,32 .
The Tolman-Oppenheimer-Volkoff (TOV) equation constrains the structure of spherically symmetric objects of isotropic material in static gravitational equilibrium, as modeled by general relativity.Besides applying the TOV equation to compact stars, there are many applications in astrophysics; for example, Gupta et al. 28 determined the hydrostatic masses of the Galaxy cluster observed using Chandra X-ray data.Inspired by the new findings of star motions under the influence of dark matter, Bors and Stańczy 29 explore the model representing the interaction of relativistic gravitationally attractive diffusive fermionic particles evaporating at high energy clusters of stellar systems 30 .
In the present paper, we derive the composite TOV equations (CTOV) with a non-uniform polytropic index to model condensed matter in compact stars.We numerically integrate the CTOV equations for a wide range of the polytropic index and relativistic parameters.We will compute composite polytropic models with n=1 and n=2 for neutron stars.The structure of the paper is as follows: in "Formulation of CTOV equation", we derived the CTOV equation, "Results" deals with the results, and "Conclusion" is devoted to the conclusion.

Formulation of CTOV equation
The line element describing the interior space-time of a static spherically symmetric star in standard coordinates x a = (t, r, θ, φ) , takes the following form 7 where ν and are functions of r only.Assuming that the matter distribution within the star is isotropic with the energy-momentum tensor in the form where ρ is the mass density, P is the isotropic pressure and u α is the four-velocity vector satisfying the condi- tion u α u β = 1 .The Einstein field equations for the metric Eq. (1)and energy-momentum tensor Eq. ( 2) can be written as where G is the gravitational constant and c is the speed of light.
Using the radial component of the conservation law of energy-momentum tensor ( T αβ ;β = 0 ) one can obtain the following relation From Eq. ( 3) we get where m(r) is the gravitational mass enclosed in a sphere with radius r and is given by (1) ds 2 = e 2ν(r) c 2 dt 2 − e 2 (r) dr 2 − r 2 dθ 2 + sin 2 θdφ 2 , (2)

,
The first derivative of the mass function can be obtained from Eq. (4) as By inserting Eq. ( 8) in Eq. ( 6), the TOV-equation can be written as Imposing the pressure P is related to the density ρ in the form of the polytropic equation of state as where where ρ c is the central density, k is the pressure constant, and θ is the Emden function (the ratio of the density to the central density ρ/ρ c ).The polytropic index is denoted by n , which is given by the non-uniform formula adopted by 31 as where a and b are determined according to the physical situation of the stellar internal structure (e.g., the star with radiative core and convective envelope), where q 1 = r 0 /R denotes the core boundary, q = r/R , and ǫ is the width of the transition layer.
According to the definition of the variable polytropic index, Eq. ( 13), n might take any possible values between the polytropic indexes n 1 and n 2 (where n 1 works for the region from the center of the star to the first boundary of the transition region determined by ǫ while n 2 works from the transition region's second boundary to the star's surface).From Eq. ( 13), as q takes values between 0-1, the polytropic indexes take values between n 1 and n 2 .As a result, the star is modeled by a composite polytrope, not a double polytrope.For example, Wei 31 takes n 1 = 4, n 2 = 1.5, a = 2.75, b = 1.25, q 1 = 0.7, and ǫ = 0.001 to model the internal structure of the sun.
Performing the first derivative to Eq. (11) gives To obtain dρ 1+ 1 n c dr , we let then Differentiate both sides, we get where Now, using Eq. ( 17), we can write To calculate dθ n+1 dr , we let ( ln (ρ c ) sech 2 q − q 1 ǫ .
Vol:.( 1234567890)  24) into Eq.( 14), we obtain Equation (25) shows that the constant a disappeared due to the differentiation of Eq. ( 13); as a result, the constant b is only found in Equation (25).

Let
where M and l are the characteristic mass scale and characteristic length scale of the polytrope.Using Eq. ( 36), Eq. ( 35) can be written as Knowing that then Eq. ( 37) can be written as and where the Eqs.( 39) and ( 40) must be solved under the boundary conditions

Results
As we see from Eqs. ( 11), (12), and (39), the physical parameters of the polytrope are functions of the Emden and mass functions ( θ,ν).To calculate the Emden and the mass functions ( θ,ν ), we numerically integrated Eqs.(28) using the Rung-Kutta method package of Mathematica 13.2.The inputs to the code are the relativistic parameter (σ), the core boundary (q 1 ), the ratio q, and the width of the transition layer ( ǫ).The appropriate values of the constants a and b in Eq. ( 13) could be determined from the two relations a = (n 1 + n 2 )/2 and b = n 1 -a, where n 1 and n 2 are the polytopic indices of the first and second polytropes, respectively.In Table 1, we listed some of the possible values of a, b, n 1 , and n 2 .We can compute the model with a single polytrope if we use n 1 = n 2 (i.e., a = n and b = 0).We test the code by performing different calculations: the first test is for the Newtonian and relativistic single polytrope with n = 3 (i.e., n 1 = 3, n 2 = 3, a = 3, b = 0).In Fig. 1, we plot the Emden (the upper panel) and mass (the lower panel) functions calculated with the relativistic parameters σ = 0 for Newtonian polytrope and σ = 0.3 for relativistic polytropes.For comparison, the calculations for the single Newtonian and relativistic polytropes are (34) The constants a and b in Eq. ( 13) and the corresponding polytropic indices of the first polytrope n 1 and the second polytrope n 2 .www.nature.com/scientificreports/taken from 8 , which indicates that we agreed with maximum absolute errors of 10 -7 and 10 -5 for the Newtonian and relativistic polytropes, respectively.Now, we shall move to the calculation of composite Newtonian polytrope (i.e.σ = 0 , n 1 to n 2 ).We calcu- lated a model appropriate for the planet with a mass of 10 M Θ (M Θ is the mass of the earth), n 1 = 0.5, n 2 = 1, and a central density of 22.79 g cm −330 .Figure 2 displays the density profile of the planet model.The calculation revealed that the density at the n 1 -n 2 interface is 4.51 g cm −3 , which agrees with the interface density (0.4.47 g cm −3 ) calculated by 21 .
A neutron star (NS) interior comprises two primary components: the solid crust and liquid core.Nuclear clusters comprise the non-uniform crust, whereas the core is homogenous and uniform.We calculated composite polytropic models using n 1 = 1 and n 2 = 2 with two values of the central pressures P c = 1 × 10 35 and 2 × 10 35 dyne cm −2 and different central densities, as listed in Table 2.The relativistic parameter is calculated from the equation σ = P c /(ρ c c 2 ) ; the maximum value of σ that fulfils the causality condition is given by σ max = n/(n + 1), where the sound velocity (v s ) must be smaller than the speed of light (v s /c < 1).It is important to mention that the interface of the present composite models occurs when the polytropic index changes at the interface from n = 1 to n = 1.00001; this indicates that the models are of multi-layered polytrope, not double-layered polytrope.
The results of calculations are plotted in Fig. 3 for the density profiles, pressure distributions, masses-radius relations, and the compactification factors (CF = m(r)/r).Comparisons between models with the same central densities but different central pressures (i.e., varying relativistic parameters), for example, model 1 and model 5 or model 2 and model 6, show that increasing the σ lead to increase the radius of the star by about 30%.Also, as the σ increases, the mass of the star increases.In Table 2, we list the CF calculated against the relativistic parameter σ , for any two models with the same central densities but different central pressures: the C.F. increases with increasing σ (i.e., increasing P c ).For instance, the C.F. of model 1 is about 60% of the CF of model 5 (the central pressure of model 5 is double that of model 1).Also, the CF of model 3 is about 50% of that of model 1 (the central density of model 3 is double that of model 1).The density and pressure profiles vary smoothly from the center toward the surface of the polytrope without discontinuity through the transition region (with width Table 2. Values of the central densities, central pressures, and relativistic parameters for eight composite models calculated with polytropic indexes n 1 = 1 to n 2 = 2.  ǫ ) between n 1 and n 2 .In the present calculations, we propose ǫ = 0.01 to allow a larger range of the variation of the polytropic index when crossing the transition region.
To model the structure of the neutron star candidates Cen X-3 (mass 1.49 ± 0.49 M ʘ and radius 9.51 ± 0.13 km 33 ), PSR J1614-2230 (mass 1.97 ± 0.04 M ʘ and radius 13 ± 2 km 34,35 ), and SAXJ1808.4-3658(mass 0.9 ± 0.3 M ʘ and radius 7.951 ± 1 km 36 ), we computed four polytropic models for each star.Tables 3, 4 and 5 provide the relativistic parameter ( σ ), the central density ( ρ c ), and the central pressure (P c ) as input parameters to the code;  the output parameters are the interface density(ρ i ), the interface pressure (P i ), the radius of the core (R c ), the radius (R), and the mass (M).These computed physical quantities may be compared to the values of core-envelope models computed for n 1 = 1 in the core and n 2 = 2 in the crust for Cen X-3, PSRJ1614-2330, and SAXJ1808.4-3658 16,32.In Figs.In what follows, we shall present results obtained for each star.Cen X-3, an occulting spectroscopic binary system member, is located in the galactic plane approximately 5.7 kiloparsecs away from the Carina-Sagittarius arm 37 .The visible component is Krzeminski's Star, a supergiant, whereas the X-ray is a revolving, magnetized neutron star.In Fig. 4, we plotted the density, pressure, and mass variation with the radius of the three models.In all models, the distributions of θ,ν , ρ, and P decreases smoothly from the center to the surface without discontinuity.The observed mass and radius values (M = 1.49M ʘ , R = 9.51 km) fit approximately model_Cen4 with a total mass M = 1.48 M ʘ and radius R = 10.28 km.Comparison of the interface range of density and pressure of our models ( ρ i = 0.7707-0.8162g cm −3 , P i = 0.6787-0.9414dyne cm −2 ) for the star Cen X-3 and that from 28 ( ρ i = 1.2051 × 10 15 g cm −3 and P i = 1.977 × 10 35 dyne cm −2 ) gives smaller values of the interface density and pressure but a larger radius for the four models, that is simply because the core in our models represents about 60% of the total radius of the star while in 28 the core occupied about 33% only.
PSR J1614-2230 is a millisecond pulsar in a binary system with a white dwarf in the Scorpius constellation.It spins on its axis around 317 times per second for a duration of 3.15 ms.It was discovered in 2006 using the Parkes telescope while studying unexplained gamma-ray sources in the Energetic Gamma Ray Experiment Telescope catalog 35 .The mass of PSR J1614-2230 (1.97 M ʘ ) is the second greatest among all known neutron stars.A neutron star of such great mass limits the composition and structure of neutron stars, which are little known 36 .Our result for this star is listed in Table 4 and displayed in Fig. 5.The polytropic models predict that the core is about 60%-70% of the star's radius, so we found that the values of the density and pressure at the interface are smaller than those of the core-envelope model 34 .The observed mass and radius of the star are well fitted to model_PSR3 (the accepted model for PSR J1614-2230) with total mass M = 1.97 M ʘ and radius R = 13.46 km, which are in good agreement with observations.
In 1998, the Italian-Dutch BeppoSAX spacecraft detected SAX J1808.4-3658, the first accreting millisecond pulsar.NASA's RXTE satellite observed X-ray pulsations at the 401 Hz neutron star spin frequency during an outburst in 1998 36 .A brown dwarf binary partner with a predicted mass of 0.05 solar masses orbits the neutron star every 2.01 h.SAX J1808.4-3658 has shown X-ray burst oscillations, quasi-periodic oscillations, and coherent X-ray pulsations, making it a key to understanding the timing behavior of low-mass X-ray binaries.The mass and radius from model_SAX4 (with total mass and radius 0.9813 M ʘ and 8.6593 km) best fit the observed mass and radius (Fig. 6).The accepted model for this star predicts density and pressure at the center are as 2 × 10 15 g cm −3 and 2.157 × 10 35 dyne cm −2 higher than that predicted by 16 and model_SAX1 (model_SAX1 is computed at the same values of the central density and pressure as 16 ).
In Figs. 4, 5, and 6, we plotted the metric potentials e 2ν(r) and e −2 (r) for the models proposed for the three stars.As is shown in the figures and demonstrated by Tooper 7 , the two metrics have to be well-defined at the center and regular as well as singularity-free throughout the interior of the star.The metric functions of the model satisfy e −2 (0) = 1 and e 2ν(0) = const , i.e., finite at the center (r = 0) of the stellar configuration.Moreover, the derivatives of these potentials vanish at the center of the star, i.e., (e 2ν ) ′ r=0 = (e −2 ) ′ r=0 = 0 , which implies that the metric is regular at the center and well-behaved throughout the stellar interior.The component g rr = e −2 is always greater than or equal to unity, while the component g rr = e 2ν is always less than unity and has a minimum at r = 0.
To infer the stability of the accepted CTOV models for the three stars, the following conditions should be fulfilled 17,18 : (1) The density ρ and the pressure P should be positive, finite, and have regular behavior free from singularity within the stellar interior, i.e.,ρ ≥ 0, P ≥ 0 .According to Figs. 4, 5 and 6, we can see that this condition is satisfied by the models.(2) The gradients of the density and pressure must be negative inside the star, i.e., dρ dr ≤ 0, dP dr ≤ 0 and the pres- sure should vanish at the stellar boundary; these are shown graphically in Figs.7a, 8a, and 9a.
(3) For stable stellar configurations, the speed of sound within the star must be less than the speed of light, i.e.,0 ≤ dP dρ ≤ 1 .This is known as the causality condition, and it is satisfied by the model, see Figs. 7b, 8b, and 9b.(4) For an isotropic fluid sphere, the following energy conditions should be satisfied for stability.
Weak energy condition (WEC): ρ + P ≥ 0. The models fulfill all these energy conditions see Figs. 7c, 8c, and 9c.(5) Stability via adiabatic index: To obtain a sable model for a relativistic isotropic fluid sphere, the adiabatic index Ŵ should be greater than 4/3 37 .The adiabatic index for isotropic stellar configuration is given by 38 Ŵ = ρ+P P dP dρ .Figures 7d, 8d, and 9d show that the adiabatic index is greater than 4/3 throughout the stellar interior.(6) For the matter within the star to be non-exotic, the value of the EoS parameter ω should be positive and must satisfy Zeldovich's condition, 0 ≤ ω = P ρ ≤ 1 , at the stellar center 39 .The models fulfill this condition; see Figs. 7e, 8e, and 9e.

Conclusions
By simultaneously solving the polytropic equation of state and Einstein field equations, this work offered innovative composite polytropic models for compact stars.Using a non-uniform polytropic index, we obtained the Tolman-Oppenheimer-Volkoff equation for the relativistic composite polytrope (CTOV).We used numerical integration to solve the CTOV equation.We estimated the mass and Emden functions for various relativistic parameters and polytropic indices appropriate for neutron stars to examine the star's structure.When we test the computational code by comparing composite Newtonian models with those published in the literature, we find good agreement because the computation results demonstrate that, as the relativistic parameter approaches zero, we recover the well-known Lane-Emden equation from the Newtonian theory of polytropic stars.Additionally, there was good agreement between the relativistic model of the single polytrope estimated from the TOV and that computed from the CTOV.From the star's center to its surface, the distributions of the mass function, the Emden function, the density, the pressure, and the mass exhibit smooth variation.One advantage of the computed CTOV models is that they are multi-layered, not double-layered.
Using observable values of the mass and radius of the pulsars Cen X-3, PSR J1614-22304, and SAXJ1808.4-3658and with central density and pressure compatible with neutron core pulsars, we verified the physical correctness of the model.We used central density and pressure parameters similar to those in the literature to construct four models for each star so that they could be compared.According to the accepted models for Cen X-3 and PSR J1614-22304, the core radius of the star is estimated to be between 50 and 60% of its overall radius.We found that the core radius of star SAXJ1808.4-3658 is around 30% of the overall radius.We computed the masses and radii of the three stars as follows: M = 1.48 M ʘ and R = 10.28 km for Cen X-3, M = 1.97 M ʘ and R = 13.46 km for PSR J1614-2230, and M = 0.98 M ʘ and R = 8.65 km for SAXJ1808.4-3658.Taking into account the errors in observation, the computed masses and radius are in good agreement for the three investigated stars.www.nature.com/scientificreports/ The metric potentials for the models proposed for the three stars are found to be well-defined at the center and regular as well as singularity-free throughout the interior of the star.It can be confirmed that every single physical parameter, stability condition, and energy condition inside the stars are on a sustainable trend and vary smoothly without interruption.
Using a single EoS may not be the best option for realistic modeling of the entire star 22,40 .For example, using composite EoS instead of single EOS 41 , used polytropic equations to simulate the EoS in each location in the www.nature.com/scientificreports/obtain a homogenous sample of the CTOV models, we can calculate the grid of models covering an extensive range of the central density and relativistic parameters and compare the computed mass-radius relation with the observations.Consequently, the CTOV models for neutron stars may be compared to models calculated based on non-analytical EOS; this will be done in future work. https://doi.org/10.1038/s41598-024-65973-7

Figure 1 .
Figure 1.Comparison between solutions of composite polytrope (n 1 = 3 and n 2 = 3, CTOV equation-solid lines) and single polytrope (n = 3, TOV equation-dashed lines) with n = 3, σ = 0 and 0.3.The upper panel is for the Emden function, and the lower panel is for the mass function.

Figure 3 .
Figure 3. Density profiles, pressure profiles, mass-radius relations, and compactification factor for eight composite relativistic polytropic models computed for polytropic indexes from n = 1 to n = 2.

4 , 5
and 6, we plotted the variation of the Emden function (upper left), mass function (upper right), density (middle left), pressure (middle right), and mass (bottom) of the composite relativistic models for the three neutron stars.

Figure 4 .
Figure 4. Variation of the Emden function (upper left), mass function (upper right), density (middle left), pressure (middle right), mass (bottom left), and the metric potential (bottom right) of the composite relativistic models for the star Cen X-3.The observed mass and radius are M = 1.49M ʘ and R = 9.51 km.

Figure 5 .
Figure 5. Variation of the Emden function (upper left), mass function (upper right), density (middle left), pressure (middle right), mass (bottom left), and the metric potential (bottom right) of the composite relativistic models for the star PSRJ1614-2330.The observed mass and radius are M = 1.97 M ʘ and R = 13 km.

Figure 6 .
Figure 6.Variation of the Emden function (upper left), mass function (upper right), density (middle left), pressure (middle right), mass (bottom left), and the metric potential (bottom right) of the composite relativistic models for the star SAXJ1808.4-3658.The observed mass and radius are M = 0.9 M ʘ and R = 7.951 km.

Table 3 .
Physical parameters of the polytropic models for Cen X-3.

Table 4 .
Physical parameters of the polytropic models for PSR J1614-2230.